package com.fy.tt.executor.node.sentence.simpleStmt;



import com.fy.tt.executor.node.element.Obj;
import com.fy.tt.executor.node.element.Predicate;
import com.fy.tt.executor.node.script.SimpleStmt;
//import com.fy.tt.parser.BandLanguageParser;

import java.util.List;


public class JudgeStmt extends SimpleStmt {


    public Predicate predicate;
    public Obj obj1;
    public Obj obj2;
//    public List<BandLanguageParser.ObjectContext> objects;

    @Override
    public boolean run(String methodName) {
        boolean judgeRes=false;
        if(obj1!=null){
            obj1.run(methodName);
        }
        if(obj2!=null){
            obj2.run(methodName);
        }
        if(predicate!=null){
            judgeRes=predicate.run(methodName);
        }
        return judgeRes;
    }

}
